<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>添加</title>
    <link href="../../layuiadmin/js/adm/css/bootstrap.css" rel="stylesheet">
    <script src="../../layuiadmin/js/adm/js/vue.js"></script>
    <script src="../../layuiadmin/js/adm/js/vue-resource.js"></script>
    <script src="../../layuiadmin/js/adm/js/jquery.min.js"></script>
    <script src="../../layuiadmin/js/adm/js/bootstrap.js"></script>
    <script src="../../layuiadmin/js/adm/js/getUrlParam.js"></script>
    <script src="../../layuiadmin/js/adm/js/date.js"></script>
    <!-- 引入样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui@1.4/lib/theme-default/index.css">
    <!-- 引入组件库 -->
    <script src="https://unpkg.com/element-ui@1.4/lib/index.js"></script>
    <script src="../../layuiadmin/js/adm/js/jquery.cookie.js"></script>
    <style>
        td{
           padding-left: 10px
        }
    </style>
</head>
<body>
    <div id="app" class="container-fluid"  style="margin: 10px 5%" >
        <h4 style="size: 30px;margin-top: 30px"><b>丨基本资料</b></h4>
        <table border="1px" style="width: 100%;height: 70px;border: none;margin: 10px 0 0 15px" >
            <tr>
                <td>
                    <span style="color: darkgray">单位名称：</span><br>
                    {{address.addressUnit}}
                </td>
                <td>
                    <span style="color: darkgray">联系人：</span><br>
                    {{address.addressName}}
                </td>
                <td>
                    <span style="color: darkgray">手机号码：</span><br>
                    {{address.addressPhone}}
                </td>
            </tr>
        </table>

        <h4 style="size: 30px;margin-top: 30px"><b>丨详细资料</b></h4>
        <table border="1px" style="width: 100%;height: 310px;border: none;margin: 10px 0 0 15px" >
            <tr>
                <td>
                    <span style="color: darkgray">部门：</span><br>
                    {{address.addressDepartment}}
                </td>
                <td>
                    <span style="color: darkgray">职位：</span><br>
                    {{address.addressPosition}}
                </td>
                <td>
                    <span style="color: darkgray">固定电话：</span><br>
                    {{address.addressDecide}}
                </td>
            </tr>
            <tr>
                <td>
                    <span style="color: darkgray">邮箱：</span><br>
                    {{address.addressEmail}}
                </td>
                <td colspan="2"> </td>
            </tr>
            <tr>
                <td colspan="3">
                    <span style="color: darkgray">详细地址：</span><br>
                    {{address.addressSite}}
                </td>
               
            </tr>
            <tr>
                <td colspan="3">
                    <span style="color: darkgray">备注：</span><br>
                    {{address.addressRemark}}
                </td>
            </tr>
        </table>
    </div>

    <script>
          var vm=new Vue({
            el:'#app',
            data:{
                address:{

                }
            },
            methods: {
                postinfo(id){
                this.$http.post('http://localhost:8080/address/addressgetbyid',{"id":id},{emulateJSON:true}).then(result =>{
                    var dat=eval("("+result.body+")")
                    if(dat!=null&&dat!=""){
                        this.address=dat
                    }else{
                        this.open2()
                    }
                })
                },
                open2() {
                    this.$message({
                        showClose: true,
                        message: '不好啦!!!系统开小差了',
                        type: 'error'
                    });
                }
            },
            created () {
                var id = getUrlParam("id")
                this.postinfo(id)
            }
        })      
    </script>

</body>
</html>